﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace yq.IService
{
    [ServiceContract]
    public interface IUser
    {
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="account"></param>
        /// <param name="passWord"></param>
        /// <returns></returns>
        [OperationContract]
        yq.Dictionary.ReturnValue<string> Login(string account, string passWord);

        /// <summary>
        /// 注册系统管理员
        /// </summary>
        /// <param name="login"></param>
        /// <param name="account"></param>
        /// <returns></returns>
        [OperationContract]
        yq.Dictionary.ReturnValue<string> RegisterAdmin(Model.Logic.UserLogin login, Model.Logic.UserAccount account);

        /// <summary>
        /// 注册普通用户
        /// </summary>
        /// <param name="login"></param>
        /// <param name="account"></param>
        /// <param name="info"></param>
        /// <returns></returns>
       [OperationContract]
        yq.Dictionary.ReturnValue<string> RegisterUser(Model.Logic.UserLogin login, Model.Logic.UserAccount account, Model.Logic.UserInfo info);


        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="account"></param>
        /// <param name="passWord"></param>
        /// <returns></returns>
        [OperationContract]
        yq.Dictionary.PageList<yq.Model.Logic.UserAccount> SelectAccountPagerList(Search.User.AccountSeek search);

        /// <summary>
        /// 传入用户ID 返回用户对应的登录账号列表
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        [OperationContract]
        IList<yq.Model.Logic.UserLogin> SelectUserLoginList(string userId);

        /// <summary>
        /// 同时修改账号和用户详细信息
        /// </summary>
        /// <param name="account"></param>
        /// <param name="info"></param>
        /// <returns></returns>
        [OperationContract]
        yq.Dictionary.ReturnValue<string> EidtAccountAndInfo(yq.Model.Logic.UserAccount account, yq.Model.Logic.UserInfo info);

        /// <summary>
        /// 删除登录账号
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        yq.Dictionary.ReturnValue<string> DelLogin(string id);

        /// <summary>
        /// 重置里面
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        yq.Dictionary.ReturnValue<string> ReatLogin(string id);

        /// <summary>
        /// 重置里面
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        yq.Dictionary.ReturnValue<string> AddLogin(yq.Model.Logic.UserLogin log);
    }
}
